package de.herzog.bbp.view.javafx;

import javafx.scene.control.TableCell;
import javafx.util.StringConverter;
import de.herzog.bbp.view.bean.AbstractBean;

public abstract class AbstractStringConverter<S extends AbstractBean, T> extends StringConverter<T> {

	private TableCell<S, T> tableCell;

	@SuppressWarnings("unchecked")
	protected S getRowBean() {
		return (S) tableCell.getTableRow().getItem();
	}

	public void setTableCell(TableCell<S, T> tableCell) {
		this.tableCell = tableCell;
	}
}
